<?php
// +----------------------------------------------------------------------
// | OneThink [ WE CAN DO IT JUST THINK IT ]
// +----------------------------------------------------------------------
// | Copyright (c) 2013 http://www.onethink.cn All rights reserved.
// +----------------------------------------------------------------------
// | Author: 麦当苗儿 <zuojiazi@vip.qq.com> <http://www.zjzit.cn>
// +----------------------------------------------------------------------

namespace Help\Widget;

use Think\Action;

/**
 * Class RecommendWidget  推荐  头条
 * @package Help\Widget
 * @author:xjw129xjt xjt@ourstu.com
 */
class RecommendWidget extends Action
{

    /* 显示指定分类的同级分类或子分类列表 */
    public function lists()
    {
        $help = D('Help/Help')->getList(array('recommend' => 1, 'status' => 1));
        shuffle($help);
        $help = array_slice($help,0,20);
        $this->assign('help',$help);
        $this->display('Widget/recommend');

    }


}
